import request from '@/utils/request'

export function findAllListOne(query) {
  return request({
    url: '/super/category/supertfindAllListOne',
    method: 'get',
    params: query
  })
}


export function findAllListOneZi(parentId) {
  return request({
    url: '/super/category/supertfindAllListOneZi/' +parentId,
    method: 'get'
  })
}

export function findAllListTwo(query) {
  return request({
    url: '/super/category/supertfindAllListTwo',
    method: 'get',
    params: query
  })
}

export function findAllListTwoZi(parentId) {
  return request({
    url: '/super/category/supertfindAllListTwoZi/' +parentId,
    method: 'get'
  })
}

// 修改商品分类
export function updateCategory(data) {
  return request({
    url: '/super/category/editCategory',
    method: 'put',
    data: data
  })
}

// 删除商品分类
export function delCategory(categoryId) {
  return request({
    url: '/super/category/deleteCate/' + categoryId,
    method: 'delete'
  })
}

// 查询商品分类详细
export function getCategory(categoryId) {
  return request({
    url: '/super/category/' + categoryId,
    method: 'get'
  })
}

export function addCategory(data) {
  return request({
    url: '/super/category/add',
    method: 'post',
    data: data
  })
}

export function addCategoryJF(data) {
  return request({
    url: '/super/category/addJF',
    method: 'post',
    data: data
  })
}


export function addCategoryZi(data) {
  return request({
    url: '/super/category/addZi',
    method: 'post',
    data: data
  })
}

export function uploadCategory(data) {
  return request({
    url: '/super/category/uploadImg',
    method: 'post',
    data: data
  })
}










